//
//  Define.h
//  NJUSTHelper
//
//  Created by 郑越辉 on 2017/9/12.
//  Copyright © 2017年 njust. All rights reserved.
//
//
//#ifndef Define_h
//#define Define_h
//
#import <ASIFormDataRequest.h>
#import <TFHpple.h>
#import <SVProgressHUD.h>
#import <SDAutoLayout.h>
#import <RegexKitLite.h>
#import <UIImageView+WebCache.h>


#import "NSDate+Helper.h"
#import "NSString+Helper.h"
#import "LoginAlertView.h"
#import "UserInformation.h"
#import "UIColor+Hex.h"
#import "NSString+Regex.h"
#import "HtmlAnalysisHelper.h"
#import "DefineURL.h"
#import "DefineRegex.h"

///数据库文件
#import "ScheduleDBService.h"
#import "UserDBService.h"
#import "CourseDBService.h"
#import "UserModel.h"
#import "ScheduleModel.h"

//#ifdef DEBUG
//#define NSLog(...) NSLog(__VA_ARGS__)
//#else
//#define NSLog(...)
//#endif

#define  SCREEN_SIZE   [[UIScreen mainScreen] bounds].size
#define KScreenWidth [UIScreen mainScreen].bounds.size.width
#define KScreenHeight [UIScreen mainScreen].bounds.size.height

#define WidthBiWidth [UIScreen mainScreen].bounds.size.width/375.0
#define HightBiHight [UIScreen mainScreen].bounds.size.height/667.0

///设置第n位为1 n=(0~31)
#define SetBitTo_1(value, index) [NSString setIntegerBitTo_1_WithInteger:value Index:index]
///设置第n位位0 n=(0~31)
#define SetBitTo_0(value, index) [NSString setIntegerBitTo_0_WithInteger:value Index:index]
///从第m位到n位设置为1
#define SetBitTo_1_Range(value, m, n) [NSString setIntegerBitTo_1_WithInteger:value IndexFrom:m TO: n]
///从第m位到n位设置为1
#define SetBitTo_0_Range(value, m, n) [NSString setIntegerBitTo_0_WithInteger:value IndexFrom:m TO: n]
///获取第n位, 为1,返回YES, 为0,返回NO
#define CheckBit(value, index)   [NSString checkIntegerBitIs_1_WithInteger:value Index:index]


//随机颜色
#define KRandomColor [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0]
//通知中心
#define KNotificationCenter [NSNotificationCenter defaultCenter]
//弱引用
#define WeakSelf(type)  __weak typeof(type) weak##type = type;
//判断是否是iPhone4s
#define IS_IPHONE4S (([[UIScreen mainScreen] bounds].size.height-480)?NO:YES)
//判断是否是iPhone5
#define IS_IPHONE5 (([[UIScreen mainScreen] bounds].size.height-568)?NO:YES)
//判断是否是iPhone6、iPhone7
#define IS_IPHONE6 (([[UIScreen mainScreen] bounds].size.height-667)?NO:YES)
//判断是否是iPhone6plush、7plus
#define IS_IPHONE6_PLUS (([[UIScreen mainScreen] bounds].size.height-736)?NO:YES)
//Appdelegate
#define APPDELEGATE (AppDelegate *)[[UIApplication sharedApplication] delegate]
//当前设备的ios版本
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]


//----------判断ios系统------------//
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
#define IOS9 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0)
//----------带参数-----------------//
#define RGBCOLOR(r,g,b)    [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1.0f]
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
#define HexColor(str)          [UIColor colorWithHexString:str]
#define HexAColor(str,float)   [UIColor colorWithHexString:str alpha:float]   //带透明的颜色


#define MENU_ITEMS [NSMutableArray arrayWithObjects:@"课程表", @"考试与成绩", @"图书馆", @"其他", @"退出用户", @"联系我们", nil]
#define MENU_IMGES [NSMutableArray arrayWithObjects:@"left_schedule", @"left_achievement", @"left_books", @"left_other", @"left_logout", @"left_feedback", nil]
//保存用户信息
#define AccountInfo ([UserInformation shareUserInfo])



//颜色相关
#define RandomColor      [UIColor colorWithRed:arc4random_uniform(255)/255.0 green:arc4random_uniform(255)/255.0 blue:arc4random_uniform(255)/255.0 alpha:1.0f];

#define Main_Navigation_Color  HexColor(@"2ab1e7");
#define kTabbarSelectTintColor HexColor(@"2ab1e7")
#define kTabbarNormalTintColor HexColor(@"8a8a8a")
#define Default_BorderColor HexColor(@"#e7e7e7")     //边框颜色
#define DEFAULT_FONT_COLOR HexColor(@"#595558")      //默认文字颜色

#define SCHEDULE_CELL_DISABLE_COLOR HexColor(@"#bfbfbf")    //课表非本周
#define SCHEDULE_CELL_COLOR HexColor(@"#707070")    //课表非本周


//#endif /* Define_h */
